﻿@using DCMS.ViewModel.Models.Users;
@using DCMS.Core;
@using DCMS.Core.Infrastructure;

@model UserModel

@{

    var workContext = EngineContext.Current.Resolve<IStoreContext>();

}
    <ul class="nav navbar-nav navbar-right">
        <li class="dropdown dropdown-item-slide">

            <a class="dropdown-toggle pl10 pr10" data-toggle="dropdown" href="#">
                APP 下载
            </a>
            <ul class="dropdown-menu dropdown-hover dropdown-persist pn w300 bg-white animated animated-shorter fadeIn" role="menu">
                <li class="bg-light">
                    <img width="100px" height="100px" src="" id="upload_image" alt="Sample">
                </li>
                <li class="p10 br-t item-1">
                    <div class="media">
                        <a class="btn btn-primary btn-block" href="@LayoutExtensions.ResourceServerUrl("/AppUpdater/com.dcms.client.apk")" target="_blank">
                            <span class="glyphicon glyphicon-download" aria-hidden="true"></span> 直接下载
                        </a>
                    </div>
                </li>
            </ul>
        </li>
        <li class="ph10 pv20">
            <i class="fa fa-circle text-tp fs8"></i>
        </li>
        <li class="dropdown dropdown-item-slide">

            <a class="dropdown-toggle pl10 pr10" data-toggle="dropdown" href="#" id="ddl_news">
                <span class="octicon octicon-radio-tower fs18"></span>
            </a>
            <ul class="dropdown-menu dropdown-hover dropdown-persist pn w350 bg-white animated animated-shorter fadeIn" role="menu" id="newTemplate" style="max-height:930px;">
            </ul>
        </li>
        <li class="ph10 pv20">
            <i class="fa fa-circle text-tp fs8"></i>
        </li>
        <li class="dropdown">
            <a href="#" class="dropdown-toggle fw600 p15" data-toggle="dropdown" title="@Model.UserRoleNames (@(workContext!=null?workContext.CurrentStore.Name:""))">
                <img src="https://www.zhoupu123.com/file/201804/6bbb94e3c5b342259b30933139d561af.jpg" alt="avatar" class="mw30 br64 mr15">
                <span>@Model.UserRealName</span>
                <span class="caret caret-tp"></span>
            </a>
            <ul class="dropdown-menu dropdown-persist pn w250 bg-white" role="menu">
                <li class="of-h">
                    <a href="#" class="fw600 p12 animated animated-short fadeInUp topMenuNewCopunt">
                        <span class="fa fa-envelope pr5"></span> 消息
                        <span class="pull-right lh20 h-20 label label-warning label-sm" id="topMenuNewCopunt"></span>
                    </a>
                </li>
                <li class="br-t of-h">
                    <a href="#" class="fw600 p12 animated animated-short fadeInUp">
                        <span class="fa fa-calendar"></span> 任务
                        <span class="pull-right lh20 h-20 label label-warning label-sm">6</span>
                    </a>
                </li>
                <li class="br-t of-h">
                    <a href="@Url.Action("UserSetting","User")" class="fw600 p12 animated animated-short fadeInDown">
                        <span class="fa fa-gear pr5"></span> 账户设置
                    </a>
                </li>
                <li class="br-t of-h">
                    <a href="@Url.Action("ClearCache","Common")" class="fw600 p12 animated animated-short fadeInDown">
                        <span class="fa fa-trash-o pr5"></span> 清理系统缓存
                    </a>
                </li>
                <li class="br-t of-h">
                    <a href="@Url.RouteUrl("Logout")" class="fw600 p12 animated animated-short fadeInDown">
                        <span class="fa fa-power-off pr5"></span> 注销
                    </a>
                </li>
            </ul>
        </li>

        <li class="dropdown dropdown-item-slide">
            <a class="dropdown-toggle pl10 pr10" data-toggle="dropdown" href="#">
                <i class="fa fa-gear"></i>
                <span class="fw600">设置</span>
                <span class="caret caret-tp"></span>
            </a>
            <ul class="dropdown-menu dropdown-hover dropdown-persist pn  bg-white animated animated-shorter fadeIn" role="menu">
                @await Component.InvokeAsync("TopSidebar")

            </ul>
        </li>

    </ul>